#ifndef DOUBAN_MINIBLOG_MINIBLOGENTRYWIDGET_PP_H
#define DOUBAN_MINIBLOG_MINIBLOGENTRYWIDGET_PP_H

//#include "UserIconLabel.h"
#include "utils/ui/UserIconLabel.h"
#include "utils/ui/AdvancedLabel.h"
#include <QPushButton>
#include <QFrame>
#include <QLabel>
class QTextDocument;
namespace Douban
{
	class UserIconLabel;
	class MiniBlogEntry;
	class MiniBlogModule;
	class MiniBlogEntryWidget;

	class DoubanUserIconLabelInfo: public TWUtils::UI::UserIconLabelInfo
	{
		public:
			virtual QString actionText(ActionType);
			virtual bool isActionEnabled(ActionType);
			MiniBlogEntryWidgetPrivate* m_parent;
	};

	class MiniBlogEntryWidgetPrivate
	{
		static const QString Entry_HTML_TEMPLATE_NO_IMAGE;
		static const QString Entry_HTML_TEMPLATE_IMAGE;
		static const QString Entry_HTML_TEMPLATE_LINK_IMAGE;

		public:
			MiniBlogEntryWidgetPrivate(MiniBlogEntryWidget*);

			void finalize();

			void updateContentWidth(int newWidth,int oldWidth);
			void updateContent(MiniBlogEntry*);
			void updateRelatedImg();
			void setCommentCount(int);

			void updateImageLayout();
			void calculateHeightHint();

			MiniBlogEntry*	m_targetEntry;
			MiniBlogModule* m_module;
			int		i_heightHint;
			bool	b_imageClickable;
			static int BottomMargin;

			QFrame			m_bgFrame;
			QLabel			m_timeText;
			DoubanUserIconLabelInfo m_avatarinfo;
			TWUtils::UI::UserIconLabel	m_avatarIcon;
			QPushButton		m_replyBtn;
			TWUtils::UI::AdvancedLabel m_contentLabel;
			QLabel			m_picLabel;
			QLabel			m_retweetBtn;

			MiniBlogEntryWidget* m_pImpl;
	};
}
#endif // MINIBLOGENTRYWIDGET_PP_H
